package rmi.bank;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.RemoteException;

import std.bank.Bank;

public class BankAccountServer
{
	public BankAccountServer(String host) throws RemoteException,
			MalformedURLException
	{
		if (System.getSecurityManager() == null)
			System.setSecurityManager(new SecurityManager());

		System.out.println("Starting server at: " + host);
		Bank bank = new BankRMIImpl();

		Naming.rebind("//" + host + "/BankAccountServer", bank);
		System.out.println("Server started at:" + host);
	}
}
